More console-related cleanups.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 2 Dec 2005 15:26:57 +0000 (16:26 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 2 Dec 2005 15:26:57 +0000 (16:26 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/xen/i386/kernel/smp.c
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smp.c
linux-2.6-xen-sparse/drivers/xen/console/console.c
linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c

index 115869898a6af00223911ea1b20edd4525add9bd..9c3a0d534e4e0cfb31472133b2ed7cec092edc6d 100644 (file)
@@ -28,8 +28,6 @@
 #endif
 #include <asm-xen/evtchn.h>
 
-#define xxprint(msg) HYPERVISOR_console_io(CONSOLEIO_write, strlen(msg), msg)
-
 /*
  *     Some notes on x86 processor bugs affecting SMP operation:
  *
@@ -542,9 +540,7 @@ static void stop_this_cpu (void * dummy)
         */
        cpu_clear(smp_processor_id(), cpu_online_map);
        local_irq_disable();
-#if 1
-       xxprint("stop_this_cpu disable_local_APIC\n");
-#else
+#if 0
        disable_local_APIC();
 #endif
        if (cpu_data[smp_processor_id()].hlt_works_ok)
@@ -561,9 +557,7 @@ void smp_send_stop(void)
        smp_call_function(stop_this_cpu, NULL, 1, 0);
 
        local_irq_disable();
-#if 1
-       xxprint("smp_send_stop disable_local_APIC\n");
-#else
+#if 0
        disable_local_APIC();
 #endif
        local_irq_enable();
index 978ae5cf51647d6546e1f3abacaf6f2c4e7e302a..0e6ee3c72b59966f3ed55dc8923fba2949cca32c 100644 (file)
@@ -31,8 +31,6 @@
 #ifdef CONFIG_XEN
 #include <asm-xen/evtchn.h>
 
-#define xxprint(msg) HYPERVISOR_console_io(CONSOLEIO_write, strlen(msg), msg)
-
 #else
 /*
  *     Smarter SMP flushing macros. 
@@ -379,8 +377,6 @@ void smp_stop_cpu(void)
        local_irq_disable();
 #ifndef CONFIG_XEN
        disable_local_APIC();
-#else
-       xxprint("stop_this_cpu disable_local_APIC\n");
 #endif
        local_irq_enable(); 
 }
@@ -409,9 +405,7 @@ void smp_send_stop(void)
                spin_unlock(&call_lock);
 
        local_irq_disable();
-#ifdef CONFIG_XEN
-       xxprint("stop_this_cpu disable_local_APIC\n");
-#else
+#ifndef CONFIG_XEN
        disable_local_APIC();
 #endif
        local_irq_enable();
index 22f18b1511b1561bfde148a1961f38a7a44e42ae..292d4beaade9ecf4e8435499fcedf65bcce713a0 100644 (file)
@@ -134,19 +134,21 @@ static struct tty_driver *xencons_driver;
 static void kcons_write(
        struct console *c, const char *s, unsigned int count)
 {
-       int           i;
+       int           i = 0;
        unsigned long flags;
 
        spin_lock_irqsave(&xencons_lock, flags);
-    
-       for (i = 0; i < count; i++) {
-               if ((wp - wc) >= (wbuf_size - 1))
-                       break;
-               if ((wbuf[WBUF_MASK(wp++)] = s[i]) == '\n')
-                       wbuf[WBUF_MASK(wp++)] = '\r';
-       }
 
-       __xencons_tx_flush();
+       while (i < count) {
+               for (; i < count; i++) {
+                       if ((wp - wc) >= (wbuf_size - 1))
+                               break;
+                       if ((wbuf[WBUF_MASK(wp++)] = s[i]) == '\n')
+                               wbuf[WBUF_MASK(wp++)] = '\r';
+               }
+
+               __xencons_tx_flush();
+       }
 
        spin_unlock_irqrestore(&xencons_lock, flags);
 }
index ea7bfe4e22bd7d27f8c24537eb884b6882fd3313..1f97c776571e522db905a1ae8bc3ac6eb110f129 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <asm/hypervisor.h>
 #include <asm-xen/evtchn.h>
+#include <asm-xen/xencons.h>
 #include <linux/wait.h>
 #include <linux/interrupt.h>
 #include <linux/sched.h>
@@ -96,7 +97,7 @@ int xencons_ring_init(void)
                xen_start_info->console_evtchn,
                handle_input, 0, "xencons", NULL);
        if (err <= 0) {
-               xprintk("XEN console request irq failed %i\n", err);
+               printk(KERN_ERR "XEN console request irq failed %i\n", err);
                return err;
        }